using UnityEngine;
using System.Collections;

public class FadeInText : MonoBehaviour {


    private bool ready;
    private float i = 0;
	// Use this for initialization
	void Start () {

        ready = true;
	}
	
	// Update is called once per frame
	void Update () {
        if (ready)
        {
            i += 3 * Time.deltaTime;
            fade();
            if (i > 1)
            {
                ready = false;
            }
        }
	}

    void fade()
    {
        Transform p = transform;
            p.renderer.material.color = new Color(p.renderer.material.color.r, p.renderer.material.color.g, p.renderer.material.color.b, i);
    }
}
